﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainTemplate.Master" AutoEventWireup="true" CodeBehind="SearchAllDrafts.aspx.cs" Inherits="AlexandriaPressWebsite.MasterPages.AuthorPages.SearchAllDrafts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainDoc" runat="server">
    <asp:Button ID="butAllDrafts" runat="server" onclick="butAllDrafts_Click" 
        Text="All Drafts" Width="121px" CssClass="genericButton" />
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
        Text="Approved Drafts" Width="149px" CssClass="genericButton" />
    <asp:Button ID="butDraftToEdit" runat="server" Text="Draft To Edit" 
        Width="123px" onclick="butDraftToEdit_Click" CssClass="genericButton" />
    <br />
    <br />
    <br />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"  PageSize="5"
               OnPageIndexChanging="searchGridView1_OnPageIndexChanging" PagerSettings-PageButtonCount="10"
        CssClass="grid">
        <Columns>
            <asp:TemplateField HeaderText="Cover">
                <ItemTemplate>
                    <asp:Image ID="Image3" runat="server" ImageUrl='<%# Eval("ImageLocation") %>' CssClass="smallImage3" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <br />
                    Title : <asp:Label ID="DraftTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                    <br />
                    Genre : <asp:Label ID="DraftGenre" runat="server" Text='<%# Eval("Genre") %>'></asp:Label>
                    <br />
                    Date Submitted : <asp:Label ID="DraftDateSubmitted" runat="server" Text='<%# Eval("DateSubmitted") %>'></asp:Label>
                    <br />
                    Status : <asp:Label ID="DraftStatus" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                    <br />
                    <a href="PublishToSite.aspx?id=<%# Eval("DraftID") %>">PublishToSite>></a>      
                    <br />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            No Approved Drafts
        </EmptyDataTemplate>
    </asp:GridView>
    
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" AllowPaging="True" PageSize="5"
               OnPageIndexChanging="searchGridView2_OnPageIndexChanging" PagerSettings-PageButtonCount="10"
        CssClass="grid">
    <Columns>
        <asp:TemplateField HeaderText="Cover">
            <ItemTemplate>
                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageLocation") %>' CssClass="smallImage3" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <br />
                Title : <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                <br />
                Genre : <asp:Label ID="Label2" runat="server" Text='<%# Eval("Genre") %>'></asp:Label>
                <br />
                Date Submitted : <asp:Label ID="Label3" runat="server" Text='<%# Eval("DateSubmitted") %>'></asp:Label>
                <br />
                Status : <asp:Label ID="Label4" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                <br />
                </ItemTemplate>
            </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        No Drafts
    </EmptyDataTemplate>
</asp:GridView >
<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" AllowPaging="True" PageSize="5"
               OnPageIndexChanging="searchGridView3_OnPageIndexChanging" PagerSettings-PageButtonCount="10"
        CssClass="grid">
    <Columns>
        <asp:TemplateField HeaderText="Cover">
            <ItemTemplate>
                <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("ImageLocation") %>' CssClass="smallImage3" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <br />
                Title : <asp:Label ID="Label6" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                <br />
                Genre : <asp:Label ID="Label7" runat="server" Text='<%# Eval("Genre") %>'></asp:Label>
                <br />
                Date Submitted : <asp:Label ID="Label8" runat="server" Text='<%# Eval("DateSubmitted") %>'></asp:Label>
                <br />
                Status : <asp:Label ID="Label9" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                <br />
                <a href="DraftDetails.aspx?id=<%# Eval("DraftID") %>">EditDraft>></a> 
                <br />            
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        No Drafts To be Edited
    </EmptyDataTemplate>
</asp:GridView>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="formDoc" runat="server">
</asp:Content>
